package org.gdtc.storefront.service.impl;

import org.gdtc.storefront.entity.Problemcommodity;
import org.gdtc.storefront.mapper.ProblemcommodityMapper;
import org.gdtc.storefront.service.ProblemcommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProblemcommodityServiceImpl implements ProblemcommodityService {
    @Autowired
    private ProblemcommodityMapper problemcommodityMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return problemcommodityMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Problemcommodity record) {
        return problemcommodityMapper.insert(record);
    }

    @Override
    public Problemcommodity selectByPrimaryKey(Integer id) {
        return problemcommodityMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Problemcommodity> selectAll() {
        return problemcommodityMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(Problemcommodity record) {
        return problemcommodityMapper.updateByPrimaryKey(record);
    }

    @Override
    public int InsProblem(Integer storeid, Integer commodityid, Integer saleafterid, Integer stock, String jointime, String because,Integer orderid) {
        return problemcommodityMapper.InsProblem(storeid, commodityid, saleafterid, stock, jointime, because,orderid);
    }

    @Override
    public List<Problemcommodity> QueryProblemtoState(Integer storeid) {
        return problemcommodityMapper.QueryProblemtoState(storeid);
    }

    @Override
    public int UpdProblemtoState(Integer state, Integer id) {
        return problemcommodityMapper.UpdProblemtoState(state, id);
    }

    @Override
    public int QueryStock(Integer id) {
        return problemcommodityMapper.QueryStock(id);
    }

    @Override
    public int QueryCommtoStock(Integer id) {
        return problemcommodityMapper.QueryCommtoStock(id);
    }

    @Override
    public int QueryCommodityId(Integer id) {
        return problemcommodityMapper.QueryCommodityId(id);
    }

    @Override
    public List<Problemcommodity> QueryProblemtoone(Integer state, Integer storeid) {
        return problemcommodityMapper.QueryProblemtoone(state, storeid);
    }
}
